V900: Improve support for voice waypoints, add links to files.
authorrobertl <robertl>
Sun, 26 Jul 2009 17:33:06 +0000 (17:33 +0000)
committerrobertl <robertl>
Sun, 26 Jul 2009 17:33:06 +0000 (17:33 +0000)
v900.c
xmldoc/formats/v900.xml

diff --git a/v900.c b/v900.c
index 083b73bc02aa531a60ff9998ea046d54bb34fd41..ea2423d4742be579e9b6d88e3769485f773969d0 100644 (file)
--- a/v900.c
+++ b/v900.c
@@ -21,7 +21,6 @@
        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
 
        TODO:
-               - support way points
                - QUESTION: course = heading ??
                 - HEIGHT: Altitude in meters (not corrected to WGS84...) ??
  */
@@ -36,8 +35,8 @@ First line is a header line. It contains no nulls.
 Following lines are record lines. They are comma separated, but fields always
 have the exact same length (per field), and therfore, the commas are always
 at the exact same position on the line. Fields are padded with nulls, in case
-they hace shorter value then the fixed field length.
-Two modes availe: basic and advanced.
+they have shorter value then the fixed field length.
+Two modes are available: basic and advanced.
 
 The following two examples show "*" where null appears.
 
@@ -64,6 +63,8 @@ INDEX,TAG,DATE,TIME,LATITUDE N/S,LONGITUDE E/W,HEIGHT,SPEED,HEADING,FIX MODE,VAL
 9*****,T,090204,055737,31.768326N,035.209993E,150**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,*********
 10****,T,090204,055738,31.768339N,035.209976E,153**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,*********
 11****,T,090204,055739,31.768338N,035.209991E,155**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,*********
+42****,C,090724,162320,31.763841N,035.205461E,788**,9***,344,3D,SPS ,1.2**,0.9**,0.8**,*********
+121***,V,090724,162502,31.769619N,035.208964E,786**,16**,306,3D,SPS ,1.1**,0.8**,0.8**,VOX00003*
 ------advanced mode - end--------------------------- 
 
 for a little more info, see structures: 
@@ -347,10 +348,24 @@ Advanced mode: INDEX,TAG,DATE,TIME,LATITUDE N/S,LONGITUDE E/W,HEIGHT,SPEED,HEADI
                                wpt->fix = fix_unknown;
                }
 
-               if(line.bas.common.tag == 'T')
-                       track_add_wpt(track, wpt);
-                else
-                       waypt_add(wpt);
+                       track_add_wpt(track, wpt);
+               if(line.bas.common.tag != 'T')
+               {
+                       assert(line.bas.common.tag == 'C' || line.bas.common.tag == 'V');
+                       waypoint *wpt2 = waypt_dupe(wpt);
+                       if(line.bas.common.tag == 'V')  // waypoint with voice recording?
+                       {
+                               char vox_file_name[sizeof(line.adv.vox)+5];
+                               const char *vox = is_advanced_mode ? line.adv.vox : line.bas.vox;
+                               assert(vox[0] != '\0');
+                               strcpy(vox_file_name,vox);
+                               strcat(vox_file_name,".WAV");
+                               wpt2->shortname = xstrdup(vox_file_name);
+                               wpt2->description = xstrdup(vox_file_name);
+                               waypt_add_url(wpt2, xstrdup(vox_file_name), xstrdup(vox_file_name));
+                       } 
+                       waypt_add(wpt2);
+               }
        }
 }
 
index 7f45d5f972f4f6a8c440edbbb9f3cac119658086..acde38a5e360c2ee1c93db208237a224c4289ea4 100644 (file)
@@ -1,16 +1,26 @@
-<para>Read-only support for the csv file format used by <productname>Visiontac VGPS-900</productname> or <productname>Columbus V-900</productname> GPS data loggers. These seem to be two brand names for the exact same product.</para>
+<para>Read-only support for the csv file format used by <productname>Visiontac VGPS-900</productname> and <productname>Columbus V-900</productname> GPS data loggers. These seem to be two brand names for the exact same product.</para>
 
-<para>The the V-900 stores logs in on a microSD in a custom csv format. This format contains NULL chracters and fixed length fields, and therefore can not  handled by the normal csv module in GPSBabel.</para>
+<para>The the V-900 stores logs on a microSD card in a custom csv format. This format contains NULL chracters and fixed length fields, and therefore can not  be handled by the normal csv module in GPSBabel.</para>
 
 <para>
 <ulink url="http://www.visiontac.com/v900_specs.htm">Visiontac VGPS-900</ulink>
 </para>
 
-<example id="v900">
+<example id="v900_e1">
   <title>Conversion of a v900 csv log file to a gpx format</title>
   <para><userinput>gpsbabel -i v900 -f 09040400.csv -o gpx -F outfile.gpx</userinput></para>
 </example>
 
 <para>
-The device support logging of trackpoints, waypoints, and voice recordings (.wav files). Currently only track points are supported.
+The device support logging of trackpoints, waypoints, and voice recordings (.wav files).
 </para>
+
+<para>If you create voice recording waypoints, a link (url) to the corresponding wav file is added to the waypoint.
+If you happen to use this for OpenStreetMap.org project, you can easily click on a waypoint and open the wav file from within JOSM. For this you must use gpx version 1.1 as the output file. The next example shows exactly how to do that.
+</para>
+
+<example id="v900_e2">
+  <title>Conversion of a v900 csv log file to a gpx 1.1 format</title>
+  <para><userinput>gpsbabel -i v900 -f 09040400.csv -o gpx,gpxver=1.1 -F outfile.gpx</userinput></para>
+</example>
+